Fractale Tree  0.5
Plot Tree Fractale
Signals | Public Member Functions | Private Attributes | List of all members
QWidget_tree Class Reference

#include <qwidget_tree.h>

Inheritance diagram for QWidget_tree:
Inheritance graph
[legend]
Collaboration diagram for QWidget_tree:
Collaboration graph
[legend]

Signals

void Value_changed ()
 

Public Member Functions

 QWidget_tree (QWidget *parent=0)
 
int Get_Value ()
 
void Set_Value (int value)
 
double Get_Prcent ()
 
void Set_Prcent (double prcent)
 
void Init ()
 

Private Attributes

double Prcent
 
QSpinBox * SpinBox_Value
 
QLabel * Label_Prcent
 
QVBoxLayout * VBoxLayout
 

Detailed Description

Definition at line 16 of file qwidget_tree.h.

Constructor & Destructor Documentation

◆ QWidget_tree()

QWidget_tree::QWidget_tree ( QWidget *  parent = 0)
explicit

Definition at line 3 of file qwidget_tree.cpp.

References Init(), Label_Prcent, SpinBox_Value, Value_changed(), and VBoxLayout.

3  : QWidget(parent)
4 {
5  //Init
6  // SpinBox_Value
7  SpinBox_Value = new QSpinBox();
8  SpinBox_Value->setMinimum(0);
9  SpinBox_Value->setMaximum(100);
10  SpinBox_Value->setValue(0);
11  // Label_Prcent
12  Label_Prcent= new QLabel("0.00%");
13  Label_Prcent->setAlignment(Qt::AlignHCenter);
14  Init();
15  // layout
16  VBoxLayout = new QVBoxLayout();
17  VBoxLayout->addWidget(SpinBox_Value);
18  VBoxLayout->addWidget(Label_Prcent);
19 
20  //Signale
21  QObject::connect(SpinBox_Value,SIGNAL(valueChanged(int)),this,SIGNAL(Value_changed()));
22 
23  // setLayout
24  this->setLayout(VBoxLayout);
25 
26 }
QVBoxLayout * VBoxLayout
Definition: qwidget_tree.h:38
QSpinBox * SpinBox_Value
Definition: qwidget_tree.h:35
void Value_changed()
QLabel * Label_Prcent
Definition: qwidget_tree.h:36
Here is the call graph for this function:

Member Function Documentation

◆ Get_Prcent()

double QWidget_tree::Get_Prcent ( )

Definition at line 54 of file qwidget_tree.cpp.

References Prcent.

55 {
56  return Prcent;
57 }
double Prcent
Definition: qwidget_tree.h:33

◆ Get_Value()

int QWidget_tree::Get_Value ( )

Definition at line 49 of file qwidget_tree.cpp.

References SpinBox_Value.

Referenced by QWidget_trees::Get_Value_By_Index(), and QWidget_trees::Update_Value().

50 {
51  return SpinBox_Value->value();
52 }
QSpinBox * SpinBox_Value
Definition: qwidget_tree.h:35
Here is the caller graph for this function:

◆ Init()

void QWidget_tree::Init ( )

Definition at line 28 of file qwidget_tree.cpp.

References Set_Prcent(), and Set_Value().

Referenced by QWidget_tree().

29 {
30  Set_Prcent(0);
31  Set_Value(0);
32 }
void Set_Prcent(double prcent)
void Set_Value(int value)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ Set_Prcent()

void QWidget_tree::Set_Prcent ( double  prcent)

Definition at line 34 of file qwidget_tree.cpp.

References Label_Prcent, and Prcent.

Referenced by Init(), and QWidget_trees::Update_Value().

35 {
36  Prcent=prcent;
37 
38  int no=qRound(prcent*100);
39  QString txt=QString::number((double)no/100)+"%";
40  Label_Prcent->setText(txt);
41 }
double Prcent
Definition: qwidget_tree.h:33
QLabel * Label_Prcent
Definition: qwidget_tree.h:36
Here is the caller graph for this function:

◆ Set_Value()

void QWidget_tree::Set_Value ( int  value)

Definition at line 43 of file qwidget_tree.cpp.

References SpinBox_Value.

Referenced by Init(), and QWidget_trees::Set_Value_By_Index().

44 {
45  SpinBox_Value->setValue(value);
46 }
QSpinBox * SpinBox_Value
Definition: qwidget_tree.h:35
Here is the caller graph for this function:

◆ Value_changed

void QWidget_tree::Value_changed ( )
signal

Referenced by QWidget_tree().

Here is the caller graph for this function:

Member Data Documentation

◆ Label_Prcent

QLabel* QWidget_tree::Label_Prcent
private

Definition at line 36 of file qwidget_tree.h.

Referenced by QWidget_tree(), and Set_Prcent().

◆ Prcent

double QWidget_tree::Prcent
private

Definition at line 33 of file qwidget_tree.h.

Referenced by Get_Prcent(), and Set_Prcent().

◆ SpinBox_Value

QSpinBox* QWidget_tree::SpinBox_Value
private

Definition at line 35 of file qwidget_tree.h.

Referenced by Get_Value(), QWidget_tree(), and Set_Value().

◆ VBoxLayout

QVBoxLayout* QWidget_tree::VBoxLayout
private

Definition at line 38 of file qwidget_tree.h.

Referenced by QWidget_tree().


The documentation for this class was generated from the following files: